<?php
/*
 * on ajoute :
 * 		des types de produits
 */

namespace Drinkiit\BlogBundle\DataFixtures\ORM;


use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\Persistence\ObjectManager;

use Drinkiit\BlogBundle\Entity\Type_produit;

class LoadType_produitData extends AbstractFixture implements OrderedFixtureInterface {
	
    public function load(ObjectManager $manager)
    {
	
		$boisson = new Type_produit();
        $boisson->setLibelleType('Boisson');
        $manager->persist($boisson);
        $this->addReference('boisson', $boisson);
        
        $flamspizza = new Type_produit();
        $flamspizza->setLibelleType('Flams/Pizza');
        $manager->persist($flamspizza);
        $this->addReference('flamspizza', $flamspizza);
        
        $sandwich = new Type_produit();
        $sandwich->setLibelleType('Sandwich');
        $manager->persist($sandwich);
        $this->addReference('sandwich', $sandwich);
        
        $platchaud = new Type_produit();
        $platchaud->setLibelleType('Plat chaud');
        $manager->persist($platchaud);
        $this->addReference('platchaud', $platchaud);
        
        $salade = new Type_produit();
        $salade->setLibelleType('Salade');
        $manager->persist($salade);
        $this->addReference('salade', $salade);
        
        $gouter = new Type_produit();
        $gouter->setLibelleType('Gouter');
        $manager->persist($gouter);
        $this->addReference('gouter', $gouter);
        
        $dessert = new Type_produit();
        $dessert->setLibelleType('Dessert');
        $manager->persist($dessert);
        $this->addReference('dessert', $dessert);
	
		$manager->flush();
	}
	
	public function getOrder()
    {
        return 1; 
    }
}
?>
